package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.AssetsSteps;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.type.JdbcType;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/AssetsStepsMapper.class */
public interface AssetsStepsMapper {
    @Select({"select *  from  assets_steps where id = #{id}"})
    @ResultMap({"AssetsStepsMap"})
    AssetsSteps queryById(Integer num);

    @Select({"select *  from assets_steps where  status = #{status}"})
    @Results(id = "AssetsStepsMap", value = {@Result(column = "id", property = "id", jdbcType = JdbcType.INTEGER, id = true), @Result(column = "steps_type", property = "stepsType", jdbcType = JdbcType.VARCHAR), @Result(column = "steps_type_name", property = "stepsTypeName", jdbcType = JdbcType.VARCHAR)})
    List<AssetsSteps> queryAll(@Param("status") Integer num);

    @Insert({"insert into assets_steps (steps_type,status,steps_type_name) values(#{stepsType},#{status},#{stepsTypeName})"})
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int add(AssetsSteps assetsSteps);

    @Update({"update assets_steps set steps_type = #{stepsType},status = #{status},steps_type_name = #{stepsType} where id = #{id}"})
    int update(AssetsSteps assetsSteps);

    @Delete({"delete from assets_steps where id = #{id}"})
    int deleteById(Integer num);

    @Update({"update assets_steps set status = #{status} where id = #{id}"})
    int updateByid(@Param("id") Integer num, @Param("status") Integer num2);

    @Select({"select count(*)  from  assets_steps where steps_type = #{stepsType}"})
    int queryByType(String str);
}